<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>Scope Chain As Written</title>
	<script type="text/javascript">
	function a() {
		var test = 'inside';
		function b() {	
			window.scopetest = function c() {
				alert(test)
			}
		}
	}
	var test = 'outside';
	scopetest();
	</script>
</head>
<body>

<div id="where-from">
	From <a href="http://advanceddomscripting.com" title="AdvancED DOM Scripting">AdvancED DOM Scripting</a> 
	| <a href="http://www.amazon.com/exec/obidos/ASIN/1590598563/jeffreysamb05-20" title="Buy it on Amazon">Paperback</a>
</div>
</body>

</html>